class CreateCompanies < ActiveRecord::Migration[5.1]
  def change
    create_table :companies do |t|
      t.string :name, limit: 50, null: false, index: true, comment: '公司名称'
      t.string :phone_no, limit: 20, comment: '公司电话'
      t.string :postal_code, limit: 6, comment: '公司邮编'
      t.string :address, limit: 100, comment: '公司地址'
      t.string :followup_employee_code, limit: 10, index: true, comment: '跟进人员工编号'
      t.integer :is_delete, default: 0, null: false, comment: '是否删除 1-删除 0-未删除'

      t.timestamps
    end
  end
end
